home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.6 KB | 44 lines | [TEXT/GEOL] |
- Item 5975034 5-Nov-90 16:40PST
-
- From: LOCKWOOD Savitar, Mike Lockwood,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Sublaunching a Document
-
- Attn: MacApp Tech
- SentBy: Mike Lockwood
- Date 11/5/90
- Subject Sublaunching a Document
- From Mike Lockwood
- To MacApp Tech
-
- Reply to:Sublaunching a Document
- Under System 7, you can ask an application to open a document using the core
- AppleEvents such as 'odoc'.
-
- Under System 6, it is a little trickier. If the application is not currently
- running, you can sublaunch the application and then modify the AppParmHandle
- low memory global before calling WaitNextEvent. The application then reads
- this handle using the CountAppFiles and GetAppFiles calls as documented in the
- Segment Loader chapter in Inside Mac vol II.
-
- If the application is already running under MultiFinder 6.0, the situation is
- a little sticky. When you double click on a document in the Finder, the
- Finder uses an undocumented OSDispatch call to tell MultiFinder to get the
- application to open the document. MultiFinder then posts events and patches
- traps like MenuSelect and SFGetFile to imitate the user choosing the Open…
- menu item and selecting the file. This does not work in applications with
- nonstandard File menus, as you have probably noticed.
-
- I can send you some more info on this if you really want it, but I don't
- recommend this approach with System 6. It requires undocumented toolbox calls
- and is unsupported. I never got it working very well and gave up on it.
-
- The System 7 solution is clean, and is probably the best way to go.
-
- Mike
-
-
-
-